package com.nanyang.tms.common.util;


import com.nanyang.common.core.domain.ApiResult;

/**
 * <p></p>
 * <p>Description: RPC调用工具类</p>
 *
 * @author: zhangyankun
 * date: 2021/6/30 9:42
 * @Copyright: 2021 www.rongetong.cn Inc. All rights reserved.
 */
public class RpcCheckUtils {

    /**
     * 检查rpc调用是否失败
     * @param apiResult
     * @return true - 失败
     */
    public static boolean isRpcInvokeError(ApiResult apiResult){
        if (apiResult == null || apiResult.getCode() != 200 || apiResult.getData() == null) {
            return true;
        }
        return false;
    }
}
